Skip to content

feat: Solution scaling for thermal single phase - #3979

Open
frankfeifan wants to merge 18 commits into
developfrom
feat/frankfei/tempScalingForSinglePhase
Open

frankfeifan wants to merge 18 commits into
developfrom
feat/frankfei/tempScalingForSinglePhase

Conversation

@frankfeifan

@frankfeifan frankfeifan commented Feb 22, 2026 •

Copy link
Copy Markdown
Contributor

This PR aims to enable solution scaling for the thermal single-phase FVM and well models. Following changes are made:

  • Adds a maxAbsoluteTemperatureChange limit and a thermal scaling kernel to single-phase flow.
  • Mirroring CompositionalMultiphaseFlow, adds a scalingType option (Global or Local) to SinglePhaseFVM, with ScalingType moved to a shared flowSolverUtilities header. Default scalingType is Global. Local requires lineSearchAction="None".
  • Adds maxAbsolutePressureChange and maxAbsoluteTemperatureChange to single-phase wells through WellControls, used to compute a global scaling factor for the well update.
  • Applies maxAbsoluteTemperatureChange in CompositionalMultiphaseFVM and CompositionalMultiphaseWell. As with pressure, when set it overrides maxRelativeTemperatureChange.

Note: now compositional multi-phase and single-phase well models both use global scaling only. In other words, a single scaling factor is applied to every well variable. This single factor is obtained as the minimum over all well elements and wells, and primary variables (pressure, temperature, and component density for compositional solver). In the coupled reservoir solver with scalingType="Global" in the reservoir region, the factor also accounts for the minmum of the reservor solver. Further study is needed to check if a per-element scaling factor field array is essential for the well region.

@tjb-ltk tjb-ltk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good addition and cleanup of single/compositional well scaling paramerters

@frankfeifan frankfeifan added flag: ready for review ci: run integrated tests Allows to run the integrated tests in GEOS CI labels Feb 25, 2026
@frankfeifan frankfeifan added ci: run device builds Allows to run the device (CUDA/HIP) builds flag: requires rebaseline Requires rebaseline branch in integratedTests changes XML input labels Oct 12, 2026

@dkachuma dkachuma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to extend maxAbsoluteTemperatureChange to the multiphase case as well?

Comment thread src/coreComponents/schema/schema.xsd Resolved
@frankfeifan

frankfeifan commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Is it possible to extend maxAbsoluteTemperatureChange to the multiphase case as well?

It's possible. maxAbsoluteTemperatureChange resides in FlowSolverBase, so the multiphase case should already own it. Then it's just a few lines in the multiphase kernels that mirror the single phase one. I can look into it.

@OmarDuran

Copy link
Copy Markdown
Contributor

@jhuang2601 and @OmarDuran will provide feedback.

Co-authored-by: Jian Huang <53012159+jhuang2601@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes XML input ci: run device builds Allows to run the device (CUDA/HIP) builds ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: ready for review flag: requires rebaseline Requires rebaseline branch in integratedTests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants